import Login from '../pages/login/index'
import Shop from '../pages/shop/index'
import My from '../pages/my/index'
import Index from '../pages/index/index'
import Layout from '../pages/index/layout'
import Setting from '../pages/index/setting'
import NotFound from '../pages/notFound/index'
import { createBrowserRouter } from 'react-router-dom'

const router = createBrowserRouter([
    {
        path:'/home',
        element:<Index/>,
        children:[
            {
                index:true,
                element:<Layout/>
            },
            {
                path:'/home/setting',
                element:<Setting/>
            }
        ]
    },
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'/shop',
        element:<Shop/>
    },
    {
        path:'/my/:id/:name',
        element:<My/>
    },
    {
        path:'*',
        element:<NotFound/>
    }
])

export default router
